# -*- encoding:utf-8 -*-
from django.urls import path,re_path
from . import views
urlpatterns = [
    path(r"",views.CartAPIView.as_view({
            "post":"add",
            "get":"list",
            "patch":"change_selected",
            "put":"change_expire",
            "delete":"del_cart"
        })), #当post请求执行add方法
    #由于get方法已经有函数使用，所以新定义个子路由重新用get方法对应一个新函数
    path(r"order/",views.CartAPIView.as_view({
        "get":"get_selected_course"
    }))
]








































